package cn.mrcode.fd.blog.buutil;

import java.util.HashMap;

/**
 * json返回结果工具类
 * @author : zhuqiang
 * @version : V1.0
 * @date : 2016/5/26 13:06
 */
public class ResultJson {
    public static final HashMap<Integer,String> map = new HashMap<>();
    static {
        map.put(-1,"系统繁忙，请稍候再试");
        map.put(0,"success");
    }
    String code;//0 成功。非0 错误
    String msg; //消息
    Object data; //附带返回数据

    public ResultJson(String code) {
        this.code = code;
    }

    public ResultJson(String code,String msg) {
        this.msg = msg;
        this.code = code;
    }

    public ResultJson(String code, String msg, Object data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
